﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microhard.WeixinMP.Models
{
    [WeixinDataAtr("item")]
    public class WeixinNewsItem_Response
    {
        [WeixinDataAtr("news", "Title", 1, XmlValueType.StringValue, true)]
        public string Title { set; get; }
        [WeixinDataAtr("news", "Description", 2, XmlValueType.StringValue, true)]
        public string Description { set; get; }
        [WeixinDataAtr("news", "PicUrl", 3, XmlValueType.StringValue, true)]
        public string PicUrl { set; get; }
        [WeixinDataAtr("news", "Url", 4, XmlValueType.StringValue, true)]
        public string Url { set; get; }
        public int Order { set; get; }
    }

    public class WeixinNews_Response
    {
        [WeixinDataAtr("news", "ArticleCount", 1, XmlValueType.LongValue, true)]
        public int ArticleCount
        {
            get
            {
                return this.Items != null ? this.Items.Count : 0;
            }
        }
        [WeixinDataAtr("news", "Articles", 2, XmlValueType.ListValue, true)]
        public List<WeixinNewsItem_Response> Items { set; get; }

    }
}
